package com.cet.designpatterns.command;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-18 09:58
 **/
public class LightOnCommand implements Command{

    private Light light;

    public LightOnCommand() {
        light = new Light();
    }

    @Override
    public void execute() {
        light.on();
    }

    @Override
    public void undo() {
        light.off();
    }
}
